//StudybarCommentBegin
#include <stdio.h>
struct student
{
	char name[10];
	int no;
	float score[2];
};
void maxscore(struct student* pst, int n);
void average(struct student* pst, int n);

//StudybarCommentEnd
int main()
{
	struct student stu[45];
	int i,j,count,stu_no,score_no,flag=0;
	char ch;
	float max = 0, sum[2] = { 0 }, aver[2] = { 0 };
	scanf("%d", &count);
	for (i = 0; i < count; i++)
	{
		while ((ch = getchar()) != '\n' && ch != EOF);
		gets(stu[i].name);
		scanf("%d", &stu[i].no); 
		for (j = 0; j < 2; j++)
		{
			scanf("%f", &stu[i].score[j]);
			sum[j] += stu[i].score[j];
			if (stu[i].score[j] > max)
			{
				max = stu[i].score[j];
				stu_no = i;
				score_no = j;
			}
		}
	}
	printf("MaxSore=%5.1f,Name is %s,No=%ld,Score.No=%d\n", stu[stu_no].score[score_no], stu[stu_no].name, stu[stu_no].no, score_no+1);
	aver[0] = sum[0] / count;
	aver[1] = sum[1] / count;
	printf("Below average:\n");
	for (i = 0; i < count; i++)
		if (stu[i].score[0] < aver[0] && stu[i].score[1] < aver[1])
		{
			printf("%s\t\t%ld\n", stu[i].name, stu[i].no);
			flag = 1;
		}
	if (flag == 0)
		printf("Not Found");
}